1. Field of the Invention
The present invention relates to a software debugging method and a recording medium to which a debugging program has been recorded and, more particularly, to a software debugging method and a recording medium to which a debugging program has been recorded whereby debugging is carried out by providing an actual memory area, an extended memory area, and an address space information area for the implementation of software.
2. Description of the Prior Arts
In general, the software for microcomputers is developed using language processors such as assembler and compiler. The language processors usually have two functions: one function is to convert a source program such as assembler or compiler into instruction codes, and the other function is to allocate the addresses of a memory on a target system, on which the program actually runs, by a linker. The former is referred to as language processor 1 and the latter as language processor 2.
When developing a source program, which provides the source of software, the source program is normally divided into a plurality of sub modules to ensure better outlook of the program or shorten the time required for language processor 1 to perform conversion. If a program were not divided as mentioned above, then even partial correction would require that the whole program be processed by language processor 1, thus leading to a prolonged total processing time.
The sub modules are converted to instruction codes by language processor 1 to produce a sub object program. Further, a plurality of sub object programs are combined and the absolute addresses of a target system are allocated to the respective instruction codes to provide an object program executable on the target system.
The software is debugged by loading and running the object program into and on the target system. If an error is found during debugging, then the original source program or the sub module is corrected, and only the corrected sub module is converted to an instruction code by language processor 1. Then, all sub object programs are combined by language processor 2 to generate an object program, and the entire object program is loaded into the target machine again to resume the debugging.
In the case of a large-scale system having sufficient memory for the capacity of the software, a method is available wherein the sub object program generated by language processor 1 again after a partial correction has been made is placed at an address not used by the object program before correction. In this case, language processor 2 allocates a new address to the corrected sub object program. Further, only the object programs such as branch instructions referring to other modules, which have been affected due to a module address change, for updated addresses are modified. Hence, the reprocessing time and reloading time by language processor 2 can be made shorter than the time required for combining and loading all sub object programs.
In debugging the software of a built-in system, the biggest concern is the time required for loading an object program into the memory of a target system (or the debugging device at the time of debugging). The development of software involves the repetition of a cycle composed of the correction of a source program, the conversion of the corrected source program into an object program, loading, and debugging. Accordingly, the shorter the time required for the cycle, the better. The prior art, however, has been posing a problem of a long total time required for converting a source program to an object program and also a long time required for loading an object program into a debugging device for the reasons described below.
In the method according to the prior art wherein only the modified modules and the affected places are reprocessed by language processor 2 and loaded into the large-scale system, the available memory is decreased as the debugging is repeated. As a result, this method becomes no longer usable when the sub object program to be loaded has grown larger than the available memory; hence, the linking and loading of the all sub object programs must be carried out again. Further, even a minor correction always requires one sub object program be loaded.
In addition, this method cannot be applied to a built-in system for which sufficient memory cannot be prepared to reduce the cost because the price always influences the sales. This leads particularly to an extremely longer time for loading an object program. In recent years, the improved performance of the central processing units (CPU) of personal computers or workstations has led to higher speed of the language processing systems for converting source programs to object programs; however, the speed of communication means for loading object programs into target systems (debugging devices) has not been increased much.